Skip to content

fix: log a clean SSE stream end at INFO, not WARNING - #45

Merged
Bre77 merged 1 commit into
mainfrom
fm/pts-clean-end-not-warning
Sep 6, 2026
Merged

fix: log a clean SSE stream end at INFO, not WARNING#45
Bre77 merged 1 commit into
mainfrom
fm/pts-clean-end-not-warning

Conversation

@Bre77

@Bre77 Bre77 commented Sep 5, 2026

Copy link
Copy Markdown
Member

Intent

  • A Teslemetry API deploy ends every open SSE stream cleanly. __anext__'s while self.active loop treated a clean end of the response body the same as an abrupt one - TeslemetryStreamEnded at WARNING - so every streaming Home Assistant install logs a false-alarm warning on every deploy.
    • Fix: a clean end (the async for finishes with no exception) now logs "Stream ended by server, reconnecting" at INFO and reconnects immediately, exactly as before. An abrupt end (aiohttp.ClientError and subclasses - ClientPayloadError, ClientConnectionError, etc.) keeps its WARNING and backoff unchanged, and 401/403 handling is untouched.
    • TeslemetryStreamEnded stays exported and is still raised/caught internally; no behavior change for anything importing it.
  • Bumps 0.13.0 -> 0.13.1 (pragmatic versioning, no API change).

A Teslemetry API deploy closes every open SSE connection cleanly, which
the listen loop treated identically to an abrupt disconnect and logged
at WARNING - putting a false-alarm warning in every streaming Home
Assistant install's log on every deploy. A clean end (the response body
finishes with no exception) now logs at INFO and still reconnects
immediately; an abrupt end (ClientPayloadError, ClientConnectionError,
etc.) keeps its WARNING and backoff unchanged.

Bumps 0.13.0 -> 0.13.1.

Claude-Session: https://claude.ai/code/session_015AmmAcBd5k3izABQJBXxrk
@Bre77 Bre77 added the fm Opened by a Firstmate crewmate label Sep 5, 2026
@Bre77
Bre77 merged commit 6e2e3b6 into main Sep 6, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fm Opened by a Firstmate crewmate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant